# coding: utf-8

"""
    Firefly III API Client

    This is the Python client for Firefly III API  # noqa: E501

    The version of the OpenAPI document: 1.4.0
    Contact: james@firefly-iii.org
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from firefly_iii_client.configuration import Configuration


class ConfigurationData(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'is_demo_site': 'bool',
        'last_update_check': 'datetime',
        'permission_update_check': 'int',
        'single_user_mode': 'bool'
    }

    attribute_map = {
        'is_demo_site': 'is_demo_site',
        'last_update_check': 'last_update_check',
        'permission_update_check': 'permission_update_check',
        'single_user_mode': 'single_user_mode'
    }

    def __init__(self, is_demo_site=None, last_update_check=None, permission_update_check=None, single_user_mode=None, local_vars_configuration=None):  # noqa: E501
        """ConfigurationData - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._is_demo_site = None
        self._last_update_check = None
        self._permission_update_check = None
        self._single_user_mode = None
        self.discriminator = None

        if is_demo_site is not None:
            self.is_demo_site = is_demo_site
        if last_update_check is not None:
            self.last_update_check = last_update_check
        self.permission_update_check = permission_update_check
        if single_user_mode is not None:
            self.single_user_mode = single_user_mode

    @property
    def is_demo_site(self):
        """Gets the is_demo_site of this ConfigurationData.  # noqa: E501


        :return: The is_demo_site of this ConfigurationData.  # noqa: E501
        :rtype: bool
        """
        return self._is_demo_site

    @is_demo_site.setter
    def is_demo_site(self, is_demo_site):
        """Sets the is_demo_site of this ConfigurationData.


        :param is_demo_site: The is_demo_site of this ConfigurationData.  # noqa: E501
        :type: bool
        """

        self._is_demo_site = is_demo_site

    @property
    def last_update_check(self):
        """Gets the last_update_check of this ConfigurationData.  # noqa: E501


        :return: The last_update_check of this ConfigurationData.  # noqa: E501
        :rtype: datetime
        """
        return self._last_update_check

    @last_update_check.setter
    def last_update_check(self, last_update_check):
        """Sets the last_update_check of this ConfigurationData.


        :param last_update_check: The last_update_check of this ConfigurationData.  # noqa: E501
        :type: datetime
        """

        self._last_update_check = last_update_check

    @property
    def permission_update_check(self):
        """Gets the permission_update_check of this ConfigurationData.  # noqa: E501

        If the user has given permission to check for updates. - null = never asked. - -1 = never asked. - 0 = no permission. - 1 = permission   # noqa: E501

        :return: The permission_update_check of this ConfigurationData.  # noqa: E501
        :rtype: int
        """
        return self._permission_update_check

    @permission_update_check.setter
    def permission_update_check(self, permission_update_check):
        """Sets the permission_update_check of this ConfigurationData.

        If the user has given permission to check for updates. - null = never asked. - -1 = never asked. - 0 = no permission. - 1 = permission   # noqa: E501

        :param permission_update_check: The permission_update_check of this ConfigurationData.  # noqa: E501
        :type: int
        """

        self._permission_update_check = permission_update_check

    @property
    def single_user_mode(self):
        """Gets the single_user_mode of this ConfigurationData.  # noqa: E501

        Whether other users can register.  # noqa: E501

        :return: The single_user_mode of this ConfigurationData.  # noqa: E501
        :rtype: bool
        """
        return self._single_user_mode

    @single_user_mode.setter
    def single_user_mode(self, single_user_mode):
        """Sets the single_user_mode of this ConfigurationData.

        Whether other users can register.  # noqa: E501

        :param single_user_mode: The single_user_mode of this ConfigurationData.  # noqa: E501
        :type: bool
        """

        self._single_user_mode = single_user_mode

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, ConfigurationData):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, ConfigurationData):
            return True

        return self.to_dict() != other.to_dict()
